3.416 \(\int \frac{1}{\left (c+\frac{a}{x^2}+\frac{b}{x}\right ) x} \, dx\)

Optimal. Leaf size=56 \[ \frac{b \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c \sqrt{b^2-4 a c}}+\frac{\log \left (a+b x+c x^2\right )}{2 c} \]

[Out]

(b*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(c*Sqrt[b^2 - 4*a*c]) + Log[a + b*x +
 c*x^2]/(2*c)

_______________________________________________________________________________________

Rubi [A]  time = 0.0778973, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278 \[ \frac{b \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c \sqrt{b^2-4 a c}}+\frac{\log \left (a+b x+c x^2\right )}{2 c} \]

Antiderivative was successfully verified.

[In]  Int[1/((c + a/x^2 + b/x)*x),x]

[Out]

(b*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(c*Sqrt[b^2 - 4*a*c]) + Log[a + b*x +
 c*x^2]/(2*c)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 17.7413, size = 49, normalized size = 0.88 \[ \frac{b \operatorname{atanh}{\left (\frac{b + 2 c x}{\sqrt{- 4 a c + b^{2}}} \right )}}{c \sqrt{- 4 a c + b^{2}}} + \frac{\log{\left (a + b x + c x^{2} \right )}}{2 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(c+a/x**2+b/x)/x,x)

[Out]

b*atanh((b + 2*c*x)/sqrt(-4*a*c + b**2))/(c*sqrt(-4*a*c + b**2)) + log(a + b*x +
 c*x**2)/(2*c)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0553859, size = 57, normalized size = 1.02 \[ \frac{\log (a+x (b+c x))-\frac{2 b \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}}{2 c} \]

Antiderivative was successfully verified.

[In]  Integrate[1/((c + a/x^2 + b/x)*x),x]

[Out]

((-2*b*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + Log[a + x*(b
 + c*x)])/(2*c)

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 56, normalized size = 1. \[{\frac{\ln \left ( c{x}^{2}+bx+a \right ) }{2\,c}}-{\frac{b}{c}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(c+a/x^2+b/x)/x,x)

[Out]

1/2*ln(c*x^2+b*x+a)/c-b/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((c + b/x + a/x^2)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.268462, size = 1, normalized size = 0.02 \[ \left [\frac{b \log \left (\frac{b^{3} - 4 \, a b c + 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x +{\left (2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{2} + b x + a}\right ) + \sqrt{b^{2} - 4 \, a c} \log \left (c x^{2} + b x + a\right )}{2 \, \sqrt{b^{2} - 4 \, a c} c}, -\frac{2 \, b \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - \sqrt{-b^{2} + 4 \, a c} \log \left (c x^{2} + b x + a\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} c}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((c + b/x + a/x^2)*x),x, algorithm="fricas")

[Out]

[1/2*(b*log((b^3 - 4*a*b*c + 2*(b^2*c - 4*a*c^2)*x + (2*c^2*x^2 + 2*b*c*x + b^2
- 2*a*c)*sqrt(b^2 - 4*a*c))/(c*x^2 + b*x + a)) + sqrt(b^2 - 4*a*c)*log(c*x^2 + b
*x + a))/(sqrt(b^2 - 4*a*c)*c), -1/2*(2*b*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)
/(b^2 - 4*a*c)) - sqrt(-b^2 + 4*a*c)*log(c*x^2 + b*x + a))/(sqrt(-b^2 + 4*a*c)*c
)]

_______________________________________________________________________________________

Sympy [A]  time = 0.909219, size = 216, normalized size = 3.86 \[ \left (- \frac{b \sqrt{- 4 a c + b^{2}}}{2 c \left (4 a c - b^{2}\right )} + \frac{1}{2 c}\right ) \log{\left (x + \frac{- 4 a c \left (- \frac{b \sqrt{- 4 a c + b^{2}}}{2 c \left (4 a c - b^{2}\right )} + \frac{1}{2 c}\right ) + 2 a + b^{2} \left (- \frac{b \sqrt{- 4 a c + b^{2}}}{2 c \left (4 a c - b^{2}\right )} + \frac{1}{2 c}\right )}{b} \right )} + \left (\frac{b \sqrt{- 4 a c + b^{2}}}{2 c \left (4 a c - b^{2}\right )} + \frac{1}{2 c}\right ) \log{\left (x + \frac{- 4 a c \left (\frac{b \sqrt{- 4 a c + b^{2}}}{2 c \left (4 a c - b^{2}\right )} + \frac{1}{2 c}\right ) + 2 a + b^{2} \left (\frac{b \sqrt{- 4 a c + b^{2}}}{2 c \left (4 a c - b^{2}\right )} + \frac{1}{2 c}\right )}{b} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(c+a/x**2+b/x)/x,x)

[Out]

(-b*sqrt(-4*a*c + b**2)/(2*c*(4*a*c - b**2)) + 1/(2*c))*log(x + (-4*a*c*(-b*sqrt
(-4*a*c + b**2)/(2*c*(4*a*c - b**2)) + 1/(2*c)) + 2*a + b**2*(-b*sqrt(-4*a*c + b
**2)/(2*c*(4*a*c - b**2)) + 1/(2*c)))/b) + (b*sqrt(-4*a*c + b**2)/(2*c*(4*a*c -
b**2)) + 1/(2*c))*log(x + (-4*a*c*(b*sqrt(-4*a*c + b**2)/(2*c*(4*a*c - b**2)) +
1/(2*c)) + 2*a + b**2*(b*sqrt(-4*a*c + b**2)/(2*c*(4*a*c - b**2)) + 1/(2*c)))/b)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.267124, size = 74, normalized size = 1.32 \[ -\frac{b \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c} + \frac{{\rm ln}\left (c x^{2} + b x + a\right )}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((c + b/x + a/x^2)*x),x, algorithm="giac")

[Out]

-b*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c) + 1/2*ln(c*x^2
+ b*x + a)/c